//
//  SubcribeViewController.swift
//  testRxSwift
//
//  Created by 火星人 on 2017/7/24.
//  Copyright © 2017年 火星人. All rights reserved.
//

import UIKit
import RxSwift

class SubscribeViewController: BaseViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        self.view.addTapWithHandle { (tap) in
            
            let disBag = DisposeBag()
            
            Observable<String>.of("hello", "world", "china", "me").subscribe(
                
                onNext: { print("Element:", $0) },
                onError: { print("Error:", $0) },
                onCompleted: { print("Completed") },
                onDisposed: { print("Disposed") }
                
            ).disposed(by: disBag)

        }
    }

}
